package com.qdxwx.models.enums;

import com.qdxwx.common.utils.TKRequest;

import jakarta.servlet.http.HttpServletRequest;

/**
 * Qdx NetSchool Platform
 * @author qdxwx
 * @updateTime 2022/5/25
 * @description
 */
public enum ReqChannel {
    WEB,//网站端
    APP,//APP端
    MOBILE;//微站端

    public static ReqChannel form(HttpServletRequest request) {
        if (TKRequest.isMobileBrowse(request)) {
            return ReqChannel.MOBILE;
        } else {
            return ReqChannel.WEB;
        }
    }
}
